package com.itheima.tanhuan.vo.mongo;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.StrUtil;
import com.itheima.tanhuan.pojo.db.UserInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 今日佳人返回数据对象
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TodayBestVo {
    private Long id;
    private String nickname;
    private String avatar;
    private String[] tags;
    private String gender;
    private Integer age;
    //remcomment-user中的score
    private Integer fateValue;

    public static  TodayBestVo getTodayBest(UserInfo userInfo){
        TodayBestVo todayBestVo=new TodayBestVo();
        BeanUtil.copyProperties(userInfo,todayBestVo);
        todayBestVo.setTags(userInfo.getTags().split(","));
        return todayBestVo;
    }
}
